package com.locationtracker.plus.ui.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.locationtracker.plus.R
import com.locationtracker.plus.app.ext.setAdapterAnimation
import com.locationtracker.plus.app.util.SettingUtil
import com.locationtracker.plus.data.model.bean.MemberResponse

class MemberAdapter(data: MutableList<MemberResponse>?) :
    BaseQuickAdapter<MemberResponse, BaseViewHolder>(R.layout.item_member, data) {

    init {
        setAdapterAnimation(SettingUtil.getListMode())
    }

    override fun convert(helper: BaseViewHolder, item: MemberResponse) {
        item.run {
            helper.setText(R.id.item_property_name, item.phone)
            helper.setText(R.id.item_member_time, item.latest_update)
            helper.setText(R.id.item_member_location, item.latest_address)
        }
    }
}


